home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / DTS Sample Code / Macintosh Sample Code / Monthly Releases (Compressed) / MacDTS.Sample.Code.90.02.sit / SC.014.CPlusTESample / TApplication.cp < prev    next >
MacBinary  |  1989-10-01  |  11.8 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Greenstreet Publisher Document/Snippet (document/greenstreetPublisher) magic Unsupported
1% dexvert MS-DOS Code Page Info (other/dosCodePage) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sun Oct 1 00:00:00 1989, modified Sun Oct 1 00:00:00 1989, creator 'MPS ', type ASCII, 11416 bytes "TApplication.cp" , at 0x2d18 316 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0f 54 41 70 70 6c 69 | 63 61 74 69 6f 6e 2e 63 |..TAppli|cation.c|
|00000010| 70 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |p.......|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 2c 98 00 | 00 01 3c a1 4b 3c 40 a1 |.....,..|..<.K<@.|
|00000060| 4b 3c 40 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |K<@.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 24 89 00 00 |........|....$...|
|00000080| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00000090| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000000d0| 0d 23 0d 23 09 41 70 70 | 6c 65 20 4d 61 63 69 6e |.#.#.App|le Macin|
|000000e0| 74 6f 73 68 20 44 65 76 | 65 6c 6f 70 65 72 20 54 |tosh Dev|eloper T|
|000000f0| 65 63 68 6e 69 63 61 6c | 20 53 75 70 70 6f 72 74 |echnical| Support|
|00000100| 0d 23 0d 23 09 4d 75 6c | 74 69 46 69 6e 64 65 72 |.#.#.Mul|tiFinder|
|00000110| 2d 41 77 61 72 65 20 53 | 69 6d 70 6c 65 20 54 65 |-Aware S|imple Te|
|00000120| 78 74 45 64 69 74 20 53 | 61 6d 70 6c 65 20 41 70 |xtEdit S|ample Ap|
|00000130| 70 6c 69 63 61 74 69 6f | 6e 0d 23 0d 23 09 43 50 |plicatio|n.#.#.CP|
|00000140| 6c 75 73 54 45 53 61 6d | 70 6c 65 0d 23 0d 23 09 |lusTESam|ple.#.#.|
|00000150| 54 41 70 70 6c 69 63 61 | 74 69 6f 6e 2e 63 70 09 |TApplica|tion.cp.|
|00000160| 09 2d 09 43 2b 2b 20 73 | 6f 75 72 63 65 0d 23 0d |.-.C++ s|ource.#.|
|00000170| 23 09 43 6f 70 79 72 69 | 67 68 74 20 a9 20 31 39 |#.Copyri|ght . 19|
|00000180| 38 39 20 41 70 70 6c 65 | 20 43 6f 6d 70 75 74 65 |89 Apple| Compute|
|00000190| 72 2c 20 49 6e 63 2e 0d | 23 09 41 6c 6c 20 72 69 |r, Inc..|#.All ri|
|000001a0| 67 68 74 73 20 72 65 73 | 65 72 76 65 64 2e 0d 23 |ghts res|erved..#|
|000001b0| 0d 23 09 56 65 72 73 69 | 6f 6e 73 3a 09 0d 23 09 |.#.Versi|ons:..#.|
|000001c0| 09 09 31 2e 32 30 09 09 | 09 09 09 31 30 2f 38 39 |..1.20..|...10/89|
|000001d0| 0d 23 09 09 09 31 2e 31 | 30 20 09 09 09 09 09 30 |.#...1.1|0 .....0|
|000001e0| 37 2f 38 39 0d 23 09 09 | 09 31 2e 30 30 20 09 09 |7/89.#..|.1.00 ..|
|000001f0| 09 09 09 30 34 2f 38 39 | 0d 23 09 0d 23 09 43 6f |...04/89|.#..#.Co|
|00000200| 6d 70 6f 6e 65 6e 74 73 | 3a 0d 23 09 09 09 43 50 |mponents|:.#...CP|
|00000210| 6c 75 73 54 45 53 61 6d | 70 6c 65 2e 6d 61 6b 65 |lusTESam|ple.make|
|00000220| 09 09 4f 63 74 6f 62 65 | 72 20 31 2c 20 31 39 38 |..Octobe|r 1, 198|
|00000230| 39 0d 23 09 09 09 54 41 | 70 70 6c 69 63 61 74 69 |9.#...TA|pplicati|
|00000240| 6f 6e 43 6f 6d 6d 6f 6e | 2e 68 09 4f 63 74 6f 62 |onCommon|.h.Octob|
|00000250| 65 72 20 31 2c 20 31 39 | 38 39 0d 23 09 09 09 54 |er 1, 19|89.#...T|
|00000260| 41 70 70 6c 69 63 61 74 | 69 6f 6e 2e 68 09 09 09 |Applicat|ion.h...|
|00000270| 4f 63 74 6f 62 65 72 20 | 31 2c 20 31 39 38 39 0d |October |1, 1989.|
|00000280| 23 09 09 09 54 44 6f 63 | 75 6d 65 6e 74 2e 68 09 |#...TDoc|ument.h.|
|00000290| 09 09 09 4f 63 74 6f 62 | 65 72 20 31 2c 20 31 39 |...Octob|er 1, 19|
|000002a0| 38 39 0d 23 09 09 09 54 | 45 43 6f 6d 6d 6f 6e 2e |89.#...T|ECommon.|
|000002b0| 68 09 09 09 09 4f 63 74 | 6f 62 65 72 20 31 2c 20 |h....Oct|ober 1, |
|000002c0| 31 39 38 39 0d 23 09 09 | 09 54 45 53 61 6d 70 6c |1989.#..|.TESampl|
|000002d0| 65 2e 68 09 09 09 09 4f | 63 74 6f 62 65 72 20 31 |e.h....O|ctober 1|
|000002e0| 2c 20 31 39 38 39 0d 23 | 09 09 09 54 45 44 6f 63 |, 1989.#|...TEDoc|
|000002f0| 75 6d 65 6e 74 2e 68 09 | 09 09 4f 63 74 6f 62 65 |ument.h.|..Octobe|
|00000300| 72 20 31 2c 20 31 39 38 | 39 0d 23 09 09 09 54 41 |r 1, 198|9.#...TA|
|00000310| 70 70 6c 69 63 61 74 69 | 6f 6e 2e 63 70 09 09 09 |pplicati|on.cp...|
|00000320| 4f 63 74 6f 62 65 72 20 | 31 2c 20 31 39 38 39 0d |October |1, 1989.|
|00000330| 23 09 09 09 54 44 6f 63 | 75 6d 65 6e 74 2e 63 70 |#...TDoc|ument.cp|
|00000340| 09 09 09 4f 63 74 6f 62 | 65 72 20 31 2c 20 31 39 |...Octob|er 1, 19|
|00000350| 38 39 0d 23 09 09 09 54 | 45 53 61 6d 70 6c 65 2e |89.#...T|ESample.|
|00000360| 63 70 09 09 09 09 4f 63 | 74 6f 62 65 72 20 31 2c |cp....Oc|tober 1,|
|00000370| 20 31 39 38 39 0d 23 09 | 09 09 54 45 44 6f 63 75 | 1989.#.|..TEDocu|
|00000380| 6d 65 6e 74 2e 63 70 09 | 09 09 4f 63 74 6f 62 65 |ment.cp.|..Octobe|
|00000390| 72 20 31 2c 20 31 39 38 | 39 0d 23 09 09 09 54 45 |r 1, 198|9.#...TE|
|000003a0| 53 61 6d 70 6c 65 47 6c | 75 65 2e 61 09 09 09 4f |SampleGl|ue.a...O|
|000003b0| 63 74 6f 62 65 72 20 31 | 2c 20 31 39 38 39 0d 23 |ctober 1|, 1989.#|
|000003c0| 09 09 09 54 41 70 70 6c | 69 63 61 74 69 6f 6e 2e |...TAppl|ication.|
|000003d0| 72 09 09 09 4f 63 74 6f | 62 65 72 20 31 2c 20 31 |r...Octo|ber 1, 1|
|000003e0| 39 38 39 0d 23 09 09 09 | 54 45 53 61 6d 70 6c 65 |989.#...|TESample|
|000003f0| 2e 72 09 09 09 09 4f 63 | 74 6f 62 65 72 20 31 2c |.r....Oc|tober 1,|
|00000400| 20 31 39 38 39 0d 23 0d | 23 09 43 50 6c 75 73 54 | 1989.#.|#.CPlusT|
|00000410| 45 53 61 6d 70 6c 65 20 | 69 73 20 61 6e 20 65 78 |ESample |is an ex|
|00000420| 61 6d 70 6c 65 20 61 70 | 70 6c 69 63 61 74 69 6f |ample ap|plicatio|
|00000430| 6e 20 74 68 61 74 20 64 | 65 6d 6f 6e 73 74 72 61 |n that d|emonstra|
|00000440| 74 65 73 0d 23 09 68 6f | 77 20 74 6f 20 69 6e 69 |tes.#.ho|w to ini|
|00000450| 74 69 61 6c 69 7a 65 20 | 74 68 65 20 63 6f 6d 6d |tialize |the comm|
|00000460| 6f 6e 6c 79 20 75 73 65 | 64 20 74 6f 6f 6c 62 6f |only use|d toolbo|
|00000470| 78 20 6d 61 6e 61 67 65 | 72 73 2c 0d 23 09 6f 70 |x manage|rs,.#.op|
|00000480| 65 72 61 74 65 20 73 75 | 63 63 65 73 73 66 75 6c |erate su|ccessful|
|00000490| 6c 79 20 75 6e 64 65 72 | 20 4d 75 6c 74 69 46 69 |ly under| MultiFi|
|000004a0| 6e 64 65 72 2c 20 68 61 | 6e 64 6c 65 20 64 65 73 |nder, ha|ndle des|
|000004b0| 6b 0d 23 09 61 63 63 65 | 73 73 6f 72 69 65 73 20 |k.#.acce|ssories |
|000004c0| 61 6e 64 20 63 72 65 61 | 74 65 2c 20 67 72 6f 77 |and crea|te, grow|
|000004d0| 2c 20 61 6e 64 20 7a 6f | 6f 6d 20 77 69 6e 64 6f |, and zo|om windo|
|000004e0| 77 73 2e 20 54 68 65 0d | 23 09 66 75 6e 64 61 6d |ws. The.|#.fundam|
|000004f0| 65 6e 74 61 6c 20 54 65 | 78 74 45 64 69 74 20 74 |ental Te|xtEdit t|
|00000500| 6f 6f 6c 62 6f 78 20 63 | 61 6c 6c 73 20 61 6e 64 |oolbox c|alls and|
|00000510| 20 54 65 78 74 45 64 69 | 74 20 61 75 74 6f 73 63 | TextEdi|t autosc|
|00000520| 72 6f 6c 6c 0d 23 09 61 | 72 65 20 64 65 6d 6f 6e |roll.#.a|re demon|
|00000530| 73 74 72 61 74 65 64 2e | 20 49 74 20 61 6c 73 6f |strated.| It also|
|00000540| 20 73 68 6f 77 73 20 68 | 6f 77 20 74 6f 20 63 72 | shows h|ow to cr|
|00000550| 65 61 74 65 20 61 6e 64 | 20 6d 61 69 6e 74 61 69 |eate and| maintai|
|00000560| 6e 0d 23 09 73 63 72 6f | 6c 6c 62 61 72 20 63 6f |n.#.scro|llbar co|
|00000570| 6e 74 72 6f 6c 73 2e 20 | 0d 23 0d 23 09 54 68 69 |ntrols. |.#.#.Thi|
|00000580| 73 20 76 65 72 73 69 6f | 6e 20 6f 66 20 54 45 53 |s versio|n of TES|
|00000590| 61 6d 70 6c 65 20 68 61 | 73 20 62 65 65 6e 20 73 |ample ha|s been s|
|000005a0| 75 62 73 74 61 6e 74 69 | 61 6c 6c 79 20 72 65 77 |ubstanti|ally rew|
|000005b0| 6f 72 6b 65 64 20 69 6e | 0d 23 09 43 2b 2b 20 74 |orked in|.#.C++ t|
|000005c0| 6f 20 73 68 6f 77 20 68 | 6f 77 20 61 20 22 74 79 |o show h|ow a "ty|
|000005d0| 70 69 63 61 6c 22 20 6f | 62 6a 65 63 74 20 6f 72 |pical" o|bject or|
|000005e0| 69 65 6e 74 65 64 20 70 | 72 6f 67 72 61 6d 20 63 |iented p|rogram c|
|000005f0| 6f 75 6c 64 0d 23 09 62 | 65 20 77 72 69 74 74 65 |ould.#.b|e writte|
|00000600| 6e 2e 20 54 6f 20 74 68 | 69 73 20 65 6e 64 2c 20 |n. To th|is end, |
|00000610| 77 68 61 74 20 77 61 73 | 20 6f 6e 63 65 20 61 20 |what was| once a |
|00000620| 73 69 6e 67 6c 65 20 73 | 6f 75 72 63 65 20 63 6f |single s|ource co|
|00000630| 64 65 0d 23 09 66 69 6c | 65 20 68 61 73 20 62 65 |de.#.fil|e has be|
|00000640| 65 6e 20 72 65 73 74 72 | 75 63 74 75 72 65 64 20 |en restr|uctured |
|00000650| 69 6e 74 6f 20 61 20 73 | 65 74 20 6f 66 20 63 6c |into a s|et of cl|
|00000660| 61 73 73 65 73 20 77 68 | 69 63 68 0d 23 09 64 65 |asses wh|ich.#.de|
|00000670| 6d 6f 6e 73 74 72 61 74 | 65 20 74 68 65 20 61 64 |monstrat|e the ad|
|00000680| 76 61 6e 74 61 67 65 73 | 20 6f 66 20 6f 62 6a 65 |vantages| of obje|
|00000690| 63 74 2d 6f 72 69 65 6e | 74 65 64 20 70 72 6f 67 |ct-orien|ted prog|
|000006a0| 72 61 6d 6d 69 6e 67 2e | 0d 23 0d 2d 2d 2d 2d 2d |ramming.|.#.-----|
|000006b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 0d 0d 2f 2a |--------|-*/.../*|
|00000700| 0d 53 65 67 6d 65 6e 74 | 61 74 69 6f 6e 20 73 74 |.Segment|ation st|
|00000710| 72 61 74 65 67 79 3a 0d | 0d 20 20 20 20 54 68 69 |rategy:.|. Thi|
|00000720| 73 20 70 72 6f 67 72 61 | 6d 20 68 61 73 20 6f 6e |s progra|m has on|
|00000730| 6c 79 20 6f 6e 65 20 73 | 65 67 6d 65 6e 74 2c 20 |ly one s|egment, |
|00000740| 73 69 6e 63 65 20 74 68 | 65 20 69 73 73 75 65 73 |since th|e issues|
|00000750| 0d 20 20 20 20 73 75 72 | 72 6f 75 6e 64 69 6e 67 |. sur|rounding|
|00000760| 20 73 65 67 6d 65 6e 74 | 61 74 69 6f 6e 20 77 69 | segment|ation wi|
|00000770| 74 68 69 6e 20 61 20 63 | 6c 61 73 73 27 73 20 6d |thin a c|lass's m|
|00000780| 65 74 68 6f 64 73 20 68 | 61 76 65 0d 20 20 20 20 |ethods h|ave. |
|00000790| 6e 6f 74 20 62 65 65 6e | 20 69 6e 76 65 73 74 69 |not been| investi|
|000007a0| 67 61 74 65 64 20 79 65 | 74 2e 20 57 65 20 44 4f |gated ye|t. We DO|
|000007b0| 20 75 6e 6c 6f 61 64 20 | 74 68 65 20 64 61 74 61 | unload |the data|
|000007c0| 0d 20 20 20 20 69 6e 69 | 74 69 61 6c 69 7a 61 74 |. ini|tializat|
|000007d0| 69 6f 6e 20 73 65 67 6d | 65 6e 74 20 61 74 20 73 |ion segm|ent at s|
|000007e0| 74 61 72 74 75 70 20 74 | 69 6d 65 2c 20 77 68 69 |tartup t|ime, whi|
|000007f0| 63 68 20 66 72 65 65 73 | 20 75 70 0d 20 20 20 20 |ch frees| up. |
|00000800| 73 6f 6d 65 20 6d 65 6d | 6f 72 79 20 0d 0d 53 65 |some mem|ory ..Se|
|00000810| 74 50 6f 72 74 20 73 74 | 72 61 74 65 67 79 3a 0d |tPort st|rategy:.|
|00000820| 0d 20 20 20 20 54 6f 6f | 6c 62 6f 78 20 72 6f 75 |. Too|lbox rou|
|00000830| 74 69 6e 65 73 20 64 6f | 20 6e 6f 74 20 63 68 61 |tines do| not cha|
|00000840| 6e 67 65 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |nge the |current |
|00000850| 70 6f 72 74 2e 20 49 6e | 0d 20 20 20 20 73 70 69 |port. In|. spi|
|00000860| 74 65 20 6f 66 20 74 68 | 69 73 2c 20 69 6e 20 74 |te of th|is, in t|
|00000870| 68 69 73 20 70 72 6f 67 | 72 61 6d 20 77 65 20 75 |his prog|ram we u|
|00000880| 73 65 20 61 20 73 74 72 | 61 74 65 67 79 20 6f 66 |se a str|ategy of|
|00000890| 0d 20 20 20 20 63 61 6c | 6c 69 6e 67 20 53 65 74 |. cal|ling Set|
|000008a0| 50 6f 72 74 20 77 68 65 | 6e 65 76 65 72 20 77 65 |Port whe|never we|
|000008b0| 20 77 61 6e 74 20 74 6f | 20 64 72 61 77 20 6f 72 | want to| draw or|
|000008c0| 20 6d 61 6b 65 20 63 61 | 6c 6c 73 0d 20 20 20 20 | make ca|lls. |
|000008d0| 77 68 69 63 68 20 64 65 | 70 65 6e 64 20 6f 6e 20 |which de|pend on |
|000008e0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 70 6f 72 74 |the curr|ent port|
|000008f0| 2e 20 54 68 69 73 20 6d | 61 6b 65 73 20 75 73 20 |. This m|akes us |
|00000900| 6c 65 73 73 0d 20 20 20 | 20 76 75 6c 6e 65 72 61 |less. | vulnera|
|00000910| 62 6c 65 20 74 6f 20 62 | 75 67 73 20 69 6e 20 6f |ble to b|ugs in o|
|00000920| 74 68 65 72 20 73 6f 66 | 74 77 61 72 65 20 77 68 |ther sof|tware wh|
|00000930| 69 63 68 20 6d 69 67 68 | 74 20 61 6c 74 65 72 0d |ich migh|t alter.|
|00000940| 20 20 20 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | the |current |
|00000950| 70 6f 72 74 20 28 73 75 | 63 68 20 61 73 20 74 68 |port (su|ch as th|
|00000960| 65 20 62 75 67 20 28 66 | 65 61 74 75 72 65 3f 29 |e bug (f|eature?)|
|00000970| 20 69 6e 20 6d 61 6e 79 | 0d 20 20 20 20 64 65 73 | in many|. des|
|00000980| 6b 20 61 63 63 65 73 73 | 6f 72 69 65 73 20 77 68 |k access|ories wh|
|00000990| 69 63 68 20 63 68 61 6e | 67 65 20 74 68 65 20 70 |ich chan|ge the p|
|000009a0| 6f 72 74 20 6f 6e 20 4f | 70 65 6e 44 65 73 6b 41 |ort on O|penDeskA|
|000009b0| 63 63 29 2e 0d 20 20 20 | 20 48 6f 70 65 66 75 6c |cc).. | Hopeful|
|000009c0| 6c 79 2c 20 74 68 69 73 | 20 61 6c 73 6f 20 6d 61 |ly, this| also ma|
|000009d0| 6b 65 73 20 74 68 65 20 | 72 6f 75 74 69 6e 65 73 |kes the |routines|
|000009e0| 20 66 72 6f 6d 20 74 68 | 69 73 0d 20 20 20 20 70 | from th|is. p|
|000009f0| 72 6f 67 72 61 6d 20 6d | 6f 72 65 20 73 65 6c 66 |rogram m|ore self|
|00000a00| 2d 63 6f 6e 74 61 69 6e | 65 64 2c 20 73 69 6e 63 |-contain|ed, sinc|
|00000a10| 65 20 74 68 65 79 20 64 | 6f 6e 27 74 20 64 65 70 |e they d|on't dep|
|00000a20| 65 6e 64 20 6f 6e 0d 20 | 20 20 20 74 68 65 20 63 |end on. | the c|
|00000a30| 75 72 72 65 6e 74 20 70 | 6f 72 74 20 73 65 74 74 |urrent p|ort sett|
|00000a40| 69 6e 67 2e 20 0d 0d 43 | 6c 69 70 62 6f 61 72 64 |ing. ..C|lipboard|
|00000a50| 20 73 74 72 61 74 65 67 | 79 3a 0d 0d 20 20 20 20 | strateg|y:.. |
|00000a60| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 64 6f 65 |This pro|gram doe|
|00000a70| 73 20 6e 6f 74 20 6d 61 | 69 6e 74 61 69 6e 20 61 |s not ma|intain a|
|00000a80| 20 70 72 69 76 61 74 65 | 20 73 63 72 61 70 2e 0d | private| scrap..|
|00000a90| 20 20 20 20 57 68 65 6e | 65 76 65 72 20 61 20 63 | When|ever a c|
|00000aa0| 75 74 2c 20 63 6f 70 79 | 2c 20 6f 72 20 70 61 73 |ut, copy|, or pas|
|00000ab0| 74 65 20 6f 63 63 75 72 | 73 2c 20 77 65 20 69 6d |te occur|s, we im|
|00000ac0| 70 6f 72 74 2f 65 78 70 | 6f 72 74 0d 20 20 20 20 |port/exp|ort. |
|00000ad0| 66 72 6f 6d 20 74 68 65 | 20 70 75 62 6c 69 63 20 |from the| public |
|00000ae0| 73 63 72 61 70 20 74 6f | 20 54 65 78 74 45 64 69 |scrap to| TextEdi|
|00000af0| 74 27 73 20 73 63 72 61 | 70 20 72 69 67 68 74 20 |t's scra|p right |
|00000b00| 61 77 61 79 2c 0d 20 20 | 20 20 75 73 69 6e 67 20 |away,. | using |
|00000b10| 74 68 65 20 54 45 54 6f | 53 63 72 61 70 20 61 6e |the TETo|Scrap an|
|00000b20| 64 20 54 45 46 72 6f 6d | 53 63 72 61 70 20 72 6f |d TEFrom|Scrap ro|
|00000b30| 75 74 69 6e 65 73 2e 20 | 49 66 20 77 65 20 64 69 |utines. |If we di|
|00000b40| 64 0d 20 20 20 20 75 73 | 65 20 61 20 70 72 69 76 |d. us|e a priv|
|00000b50| 61 74 65 20 73 63 72 61 | 70 2c 20 74 68 65 20 69 |ate scra|p, the i|
|00000b60| 6d 70 6f 72 74 2f 65 78 | 70 6f 72 74 20 77 6f 75 |mport/ex|port wou|
|00000b70| 6c 64 20 62 65 20 69 6e | 20 74 68 65 0d 20 20 20 |ld be in| the. |
|00000b80| 20 61 63 74 69 76 61 74 | 65 2f 64 65 61 63 74 69 | activat|e/deacti|
|00000b90| 76 61 74 65 20 65 76 65 | 6e 74 20 61 6e 64 20 73 |vate eve|nt and s|
|00000ba0| 75 73 70 65 6e 64 2f 72 | 65 73 75 6d 65 20 65 76 |uspend/r|esume ev|
|00000bb0| 65 6e 74 0d 20 20 20 20 | 72 6f 75 74 69 6e 65 73 |ent. |routines|
|00000bc0| 2e 20 0d 2a 2f 0d 0d 2f | 2f 20 4d 61 63 20 49 6e |. .*/../|/ Mac In|
|00000bd0| 63 6c 75 64 65 73 0d 23 | 69 6e 63 6c 75 64 65 20 |cludes.#|include |
|00000be0| 3c 54 79 70 65 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |<Types.h|>.#inclu|
|00000bf0| 64 65 20 3c 51 75 69 63 | 6b 44 72 61 77 2e 68 3e |de <Quic|kDraw.h>|
|00000c00| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 46 6f 6e 74 73 |.#includ|e <Fonts|
|00000c10| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 45 76 |.h>.#inc|lude <Ev|
|00000c20| 65 6e 74 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |ents.h>.|#include|
|00000c30| 20 3c 43 6f 6e 74 72 6f | 6c 73 2e 68 3e 0d 23 69 | <Contro|ls.h>.#i|
|00000c40| 6e 63 6c 75 64 65 20 3c | 57 69 6e 64 6f 77 73 2e |nclude <|Windows.|
|00000c50| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 4d 65 6e |h>.#incl|ude <Men|
|00000c60| 75 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |us.h>.#i|nclude <|
|00000c70| 54 65 78 74 45 64 69 74 | 2e 68 3e 0d 23 69 6e 63 |TextEdit|.h>.#inc|
|00000c80| 6c 75 64 65 20 3c 44 69 | 61 6c 6f 67 73 2e 68 3e |lude <Di|alogs.h>|
|00000c90| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 44 65 73 6b 2e |.#includ|e <Desk.|
|00000ca0| 68 3e 0d 23 69 6e 63 6c | 75 64 65 20 3c 53 63 72 |h>.#incl|ude <Scr|
|00000cb0| 61 70 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ap.h>.#i|nclude <|
|00000cc0| 54 6f 6f 6c 55 74 69 6c | 73 2e 68 3e 0d 23 69 6e |ToolUtil|s.h>.#in|
|00000cd0| 63 6c 75 64 65 20 3c 4d | 65 6d 6f 72 79 2e 68 3e |clude <M|emory.h>|
|00000ce0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 53 65 67 4c 6f |.#includ|e <SegLo|
|00000cf0| 61 64 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |ad.h>.#i|nclude <|
|00000d00| 46 69 6c 65 73 2e 68 3e | 0d 23 69 6e 63 6c 75 64 |Files.h>|.#includ|
|00000d10| 65 20 3c 4f 53 55 74 69 | 6c 73 2e 68 3e 0d 23 69 |e <OSUti|ls.h>.#i|
|00000d20| 6e 63 6c 75 64 65 20 3c | 54 72 61 70 73 2e 68 3e |nclude <|Traps.h>|
|00000d30| 0d 0d 23 69 66 6e 64 65 | 66 20 5f 5f 54 41 50 50 |..#ifnde|f __TAPP|
|00000d40| 4c 49 43 41 54 49 4f 4e | 5f 5f 0d 23 69 6e 63 6c |LICATION|__.#incl|
|00000d50| 75 64 65 20 22 54 41 70 | 70 6c 69 63 61 74 69 6f |ude "TAp|plicatio|
|00000d60| 6e 2e 68 22 0d 23 65 6e | 64 69 66 20 5f 5f 54 41 |n.h".#en|dif __TA|
|00000d70| 50 50 4c 49 43 41 54 49 | 4f 4e 5f 5f 0d 0d 2f 2f |PPLICATI|ON__..//|
|00000d80| 20 4f 53 45 76 65 6e 74 | 20 69 73 20 74 68 65 20 | OSEvent| is the |
|00000d90| 65 76 65 6e 74 20 6e 75 | 6d 62 65 72 20 6f 66 20 |event nu|mber of |
|00000da0| 74 68 65 20 73 75 73 70 | 65 6e 64 2f 72 65 73 75 |the susp|end/resu|
|00000db0| 6d 65 20 61 6e 64 20 6d | 6f 75 73 65 2d 6d 6f 76 |me and m|ouse-mov|
|00000dc0| 65 64 20 65 76 65 6e 74 | 73 20 73 65 6e 74 0d 2f |ed event|s sent./|
|00000dd0| 2f 20 62 79 20 4d 75 6c | 74 69 46 69 6e 64 65 72 |/ by Mul|tiFinder|
|00000de0| 2e 20 4f 6e 63 65 20 77 | 65 20 64 65 74 65 72 6d |. Once w|e determ|
|00000df0| 69 6e 65 20 74 68 61 74 | 20 61 6e 20 65 76 65 6e |ine that| an even|
|00000e00| 74 20 69 73 20 61 6e 20 | 6f 73 45 76 65 6e 74 2c |t is an |osEvent,|
|00000e10| 20 77 65 20 6c 6f 6f 6b | 20 61 74 20 74 68 65 0d | we look| at the.|
|00000e20| 2f 2f 20 68 69 67 68 20 | 62 79 74 65 20 6f 66 20 |// high |byte of |
|00000e30| 74 68 65 20 6d 65 73 73 | 61 67 65 20 73 65 6e 74 |the mess|age sent|
|00000e40| 20 74 6f 20 64 65 74 65 | 72 6d 69 6e 65 20 77 68 | to dete|rmine wh|
|00000e50| 69 63 68 20 6b 69 6e 64 | 20 69 74 20 69 73 2e 20 |ich kind| it is. |
|00000e60| 54 6f 20 64 69 66 66 65 | 72 65 6e 74 69 61 74 65 |To diffe|rentiate|
|00000e70| 0d 2f 2f 20 73 75 73 70 | 65 6e 64 20 61 6e 64 20 |.// susp|end and |
|00000e80| 72 65 73 75 6d 65 20 65 | 76 65 6e 74 73 20 77 65 |resume e|vents we|
|00000e90| 20 63 68 65 63 6b 20 74 | 68 65 20 72 65 73 75 6d | check t|he resum|
|00000ea0| 65 4d 61 73 6b 20 62 69 | 74 2e 0d 63 6f 6e 73 74 |eMask bi|t..const|
|00000eb0| 20 73 68 6f 72 74 20 6b | 4f 73 45 76 65 6e 74 20 | short k|OsEvent |
|00000ec0| 3d 20 61 70 70 34 45 76 | 74 3b 09 09 09 09 2f 2f |= app4Ev|t;....//|
|00000ed0| 20 65 76 65 6e 74 20 75 | 73 65 64 20 62 79 20 4d | event u|sed by M|
|00000ee0| 75 6c 74 69 46 69 6e 64 | 65 72 0d 63 6f 6e 73 74 |ultiFind|er.const|
|00000ef0| 20 73 68 6f 72 74 20 6b | 53 75 73 70 65 6e 64 52 | short k|SuspendR|
|00000f00| 65 73 75 6d 65 4d 65 73 | 73 61 67 65 20 3d 20 30 |esumeMes|sage = 0|
|00000f10| 78 30 31 3b 09 2f 2f 20 | 68 69 67 68 20 62 79 74 |x01;.// |high byt|
|00000f20| 65 20 6f 66 20 73 75 73 | 70 65 6e 64 2f 72 65 73 |e of sus|pend/res|
|00000f30| 75 6d 65 20 65 76 65 6e | 74 20 6d 65 73 73 61 67 |ume even|t messag|
|00000f40| 65 0d 63 6f 6e 73 74 20 | 73 68 6f 72 74 20 6b 43 |e.const |short kC|
|00000f50| 6c 69 70 43 6f 6e 76 65 | 72 74 4d 61 73 6b 20 3d |lipConve|rtMask =|
|00000f60| 20 30 78 30 32 3b 09 09 | 2f 2f 20 62 69 74 20 6f | 0x02;..|// bit o|
|00000f70| 66 20 6d 65 73 73 61 67 | 65 20 66 69 65 6c 64 20 |f messag|e field |
|00000f80| 63 6c 69 70 20 63 6f 6e | 76 65 72 73 69 6f 6e 0d |clip con|version.|
|00000f90| 63 6f 6e 73 74 20 73 68 | 6f 72 74 20 6b 52 65 73 |const sh|ort kRes|
|00000fa0| 75 6d 65 4d 61 73 6b 20 | 3d 20 30 78 30 31 3b 09 |umeMask |= 0x01;.|
|00000fb0| 09 09 09 2f 2f 20 62 69 | 74 20 6f 66 20 6d 65 73 |...// bi|t of mes|
|00000fc0| 73 61 67 65 20 66 69 65 | 6c 64 20 66 6f 72 20 72 |sage fie|ld for r|
|00000fd0| 65 73 75 6d 65 20 76 73 | 2e 20 73 75 73 70 65 6e |esume vs|. suspen|
|00000fe0| 64 0d 63 6f 6e 73 74 20 | 73 68 6f 72 74 20 6b 4d |d.const |short kM|
|00000ff0| 6f 75 73 65 4d 6f 76 65 | 64 4d 65 73 73 61 67 65 |ouseMove|dMessage|
|00001000| 20 3d 20 30 78 46 41 3b | 09 09 2f 2f 20 68 69 67 | = 0xFA;|..// hig|
|00001010| 68 20 62 79 74 65 20 6f | 66 20 6d 6f 75 73 65 2d |h byte o|f mouse-|
|00001020| 6d 6f 76 65 64 20 65 76 | 65 6e 74 20 6d 65 73 73 |moved ev|ent mess|
|00001030| 61 67 65 0d 0d 65 78 74 | 65 72 6e 20 22 43 22 20 |age..ext|ern "C" |
|00001040| 7b 20 0d 09 2f 2f 20 66 | 72 6f 6d 20 4d 50 57 20 |{ ..// f|rom MPW |
|00001050| 73 74 61 6e 64 61 72 64 | 20 6c 69 62 72 61 72 79 |standard| library|
|00001060| 0d 09 76 6f 69 64 20 5f | 44 61 74 61 49 6e 69 74 |..void _|DataInit|
|00001070| 28 29 3b 09 09 09 09 2f | 2f 20 73 65 74 73 20 75 |();..../|/ sets u|
|00001080| 70 20 41 35 20 67 6c 6f | 62 61 6c 73 0d 7d 3b 0d |p A5 glo|bals.};.|
|00001090| 0d 54 41 70 70 6c 69 63 | 61 74 69 6f 6e 3a 3a 54 |.TApplic|ation::T|
|000010a0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 28 29 0d 7b 0d |Applicat|ion().{.|
|000010b0| 09 53 79 73 45 6e 76 52 | 65 63 20 65 6e 76 52 65 |.SysEnvR|ec envRe|
|000010c0| 63 3b 0d 09 6c 6f 6e 67 | 20 73 74 6b 4e 65 65 64 |c;..long| stkNeed|
|000010d0| 65 64 3b 0d 09 6c 6f 6e | 67 20 68 65 61 70 53 69 |ed;..lon|g heapSi|
|000010e0| 7a 65 3b 0d 0d 09 2f 2f | 20 69 6e 69 74 69 61 6c |ze;...//| initial|
|000010f0| 69 7a 65 20 4d 61 63 20 | 54 6f 6f 6c 62 6f 78 20 |ize Mac |Toolbox |
|00001100| 63 6f 6d 70 6f 6e 65 6e | 74 73 0d 09 49 6e 69 74 |componen|ts..Init|
|00001110| 47 72 61 66 28 28 50 74 | 72 29 20 26 71 64 2e 74 |Graf((Pt|r) &qd.t|
|00001120| 68 65 50 6f 72 74 29 3b | 0d 09 49 6e 69 74 46 6f |hePort);|..InitFo|
|00001130| 6e 74 73 28 29 3b 0d 09 | 49 6e 69 74 57 69 6e 64 |nts();..|InitWind|
|00001140| 6f 77 73 28 29 3b 0d 09 | 49 6e 69 74 4d 65 6e 75 |ows();..|InitMenu|
|00001150| 73 28 29 3b 0d 09 54 45 | 49 6e 69 74 28 29 3b 0d |s();..TE|Init();.|
|00001160| 09 49 6e 69 74 44 69 61 | 6c 6f 67 73 28 28 52 65 |.InitDia|logs((Re|
|00001170| 73 75 6d 65 50 72 6f 63 | 50 74 72 29 20 6e 69 6c |sumeProc|Ptr) nil|
|00001180| 29 3b 0d 09 49 6e 69 74 | 43 75 72 73 6f 72 28 29 |);..Init|Cursor()|
|00001190| 3b 0d 0d 09 2f 2f 20 55 | 6e 6c 6f 61 64 20 64 61 |;...// U|nload da|
|000011a0| 74 61 20 73 65 67 6d 65 | 6e 74 3a 20 6e 6f 74 65 |ta segme|nt: note|
|000011b0| 20 74 68 61 74 20 5f 44 | 61 74 61 49 6e 69 74 20 | that _D|ataInit |
|000011c0| 6d 75 73 74 20 6e 6f 74 | 20 62 65 20 69 6e 20 4d |must not| be in M|
|000011d0| 61 69 6e 21 0d 09 55 6e | 6c 6f 61 64 53 65 67 28 |ain!..Un|loadSeg(|
|000011e0| 28 50 72 6f 63 50 74 72 | 29 20 5f 44 61 74 61 49 |(ProcPtr|) _DataI|
|000011f0| 6e 69 74 29 3b 0d 0d 09 | 2f 2f 20 69 67 6e 6f 72 |nit);...|// ignor|
|00001200| 65 20 74 68 65 20 65 72 | 72 6f 72 20 72 65 74 75 |e the er|ror retu|
|00001210| 72 6e 65 64 20 66 72 6f | 6d 20 53 79 73 45 6e 76 |rned fro|m SysEnv|
|00001220| 69 72 6f 6e 73 3b 20 65 | 76 65 6e 20 69 66 20 61 |irons; e|ven if a|
|00001230| 6e 20 65 72 72 6f 72 20 | 6f 63 63 75 72 72 65 64 |n error |occurred|
|00001240| 2c 0d 09 2f 2f 20 74 68 | 65 20 53 79 73 45 6e 76 |,..// th|e SysEnv|
|00001250| 69 72 6f 6e 73 20 67 6c | 75 65 20 77 69 6c 6c 20 |irons gl|ue will |
|00001260| 66 69 6c 6c 20 69 6e 20 | 74 68 65 20 53 79 73 45 |fill in |the SysE|
|00001270| 6e 76 52 65 63 0d 09 28 | 76 6f 69 64 29 20 53 79 |nvRec..(|void) Sy|
|00001280| 73 45 6e 76 69 72 6f 6e | 73 28 63 75 72 53 79 73 |sEnviron|s(curSys|
|00001290| 45 6e 76 56 65 72 73 2c | 20 26 65 6e 76 52 65 63 |EnvVers,| &envRec|
|000012a0| 29 3b 0d 0d 09 2f 2f 20 | 41 72 65 20 77 65 20 72 |);...// |Are we r|
|000012b0| 75 6e 6e 69 6e 67 20 6f | 6e 20 61 20 31 32 38 4b |unning o|n a 128K|
|000012c0| 20 52 4f 4d 20 6d 61 63 | 68 69 6e 65 20 6f 72 20 | ROM mac|hine or |
|000012d0| 62 65 74 74 65 72 3f 3f | 3f 0d 09 69 66 20 28 65 |better??|?..if (e|
|000012e0| 6e 76 52 65 63 2e 6d 61 | 63 68 69 6e 65 54 79 70 |nvRec.ma|chineTyp|
|000012f0| 65 20 3c 20 30 29 0d 09 | 20 20 42 69 67 42 61 64 |e < 0)..| BigBad|
|00001300| 45 72 72 6f 72 28 6b 45 | 72 72 53 74 72 69 6e 67 |Error(kE|rrString|
|00001310| 73 2c 65 57 72 6f 6e 67 | 4d 61 63 68 69 6e 65 29 |s,eWrong|Machine)|
|00001320| 3b 09 09 2f 2f 20 69 66 | 20 6e 6f 74 2c 20 61 6c |;..// if| not, al|
|00001330| 65 72 74 20 26 20 71 75 | 69 74 0d 0d 09 2f 2f 20 |ert & qu|it...// |
|00001340| 69 66 20 77 65 20 6e 65 | 65 64 20 6d 6f 72 65 20 |if we ne|ed more |
|00001350| 73 74 61 63 6b 20 73 70 | 61 63 65 2c 20 67 65 74 |stack sp|ace, get|
|00001360| 20 69 74 20 6e 6f 77 0d | 09 73 74 6b 4e 65 65 64 | it now.|.stkNeed|
|00001370| 65 64 20 3d 20 53 74 61 | 63 6b 4e 65 65 64 65 64 |ed = Sta|ckNeeded|
|00001380| 28 29 3b 0d 09 69 66 20 | 28 73 74 6b 4e 65 65 64 |();..if |(stkNeed|
|00001390| 65 64 20 3e 20 53 74 61 | 63 6b 53 70 61 63 65 28 |ed > Sta|ckSpace(|
|000013a0| 29 29 0d 09 20 20 7b 0d | 09 09 2f 2f 20 6e 65 77 |)).. {.|..// new|
|000013b0| 20 61 64 64 72 65 73 73 | 20 69 73 20 68 65 61 70 | address| is heap|
|000013c0| 20 73 69 7a 65 20 2b 20 | 63 75 72 72 65 6e 74 20 | size + |current |
|000013d0| 73 74 61 63 6b 20 2d 20 | 6e 65 65 64 65 64 20 73 |stack - |needed s|
|000013e0| 74 61 63 6b 0d 09 09 53 | 65 74 41 70 70 6c 4c 69 |tack...S|etApplLi|
|000013f0| 6d 69 74 28 28 50 74 72 | 29 20 28 28 6c 6f 6e 67 |mit((Ptr|) ((long|
|00001400| 29 20 47 65 74 41 70 70 | 6c 4c 69 6d 69 74 28 29 |) GetApp|lLimit()|
|00001410| 20 2d 20 73 74 6b 4e 65 | 65 64 65 64 20 2b 20 53 | - stkNe|eded + S|
|00001420| 74 61 63 6b 53 70 61 63 | 65 28 29 29 29 3b 0d 09 |tackSpac|e()));..|
|00001430| 20 20 7d 0d 0d 09 2f 2f | 20 43 68 65 63 6b 20 66 | }...//| Check f|
|00001440| 6f 72 20 6d 69 6e 69 6d | 75 6d 20 68 65 61 70 20 |or minim|um heap |
|00001450| 73 69 7a 65 0d 09 68 65 | 61 70 53 69 7a 65 20 3d |size..he|apSize =|
|00001460| 20 28 6c 6f 6e 67 29 20 | 47 65 74 41 70 70 6c 4c | (long) |GetApplL|
|00001470| 69 6d 69 74 28 29 20 2d | 20 28 6c 6f 6e 67 29 20 |imit() -| (long) |
|00001480| 41 70 70 6c 69 63 5a 6f | 6e 65 28 29 3b 0d 09 69 |ApplicZo|ne();..i|
|00001490| 66 20 28 68 65 61 70 53 | 69 7a 65 20 3c 20 48 65 |f (heapS|ize < He|
|000014a0| 61 70 4e 65 65 64 65 64 | 28 29 29 0d 09 20 20 42 |apNeeded|()).. B|
|000014b0| 69 67 42 61 64 45 72 72 | 6f 72 28 6b 45 72 72 53 |igBadErr|or(kErrS|
|000014c0| 74 72 69 6e 67 73 2c 65 | 53 6d 61 6c 6c 53 69 7a |trings,e|SmallSiz|
|000014d0| 65 29 3b 0d 0d 09 2f 2f | 20 65 78 70 61 6e 64 20 |e);...//| expand |
|000014e0| 74 68 65 20 68 65 61 70 | 20 73 6f 20 6e 65 77 20 |the heap| so new |
|000014f0| 63 6f 64 65 20 73 65 67 | 6d 65 6e 74 73 20 6c 6f |code seg|ments lo|
|00001500| 61 64 20 61 74 20 74 68 | 65 20 74 6f 70 0d 09 4d |ad at th|e top..M|
|00001510| 61 78 41 70 70 6c 5a 6f | 6e 65 28 29 3b 0d 0d 09 |axApplZo|ne();...|
|00001520| 2f 2f 20 61 6c 6c 6f 63 | 61 74 65 20 61 6e 20 65 |// alloc|ate an e|
|00001530| 6d 70 74 79 20 64 6f 63 | 75 6d 65 6e 74 20 6c 69 |mpty doc|ument li|
|00001540| 73 74 0d 09 66 44 6f 63 | 4c 69 73 74 20 3d 20 6e |st..fDoc|List = n|
|00001550| 65 77 20 54 44 6f 63 75 | 6d 65 6e 74 4c 69 73 74 |ew TDocu|mentList|
|00001560| 3b 0d 0d 09 2f 2f 20 63 | 68 65 63 6b 20 74 6f 20 |;...// c|heck to |
|00001570| 73 65 65 20 69 66 20 57 | 61 69 74 4e 65 78 74 45 |see if W|aitNextE|
|00001580| 76 65 6e 74 20 69 73 20 | 69 6d 70 6c 65 6d 65 6e |vent is |implemen|
|00001590| 74 65 64 0d 09 66 48 61 | 76 65 57 61 69 74 4e 65 |ted..fHa|veWaitNe|
|000015a0| 78 74 45 76 65 6e 74 20 | 3d 20 54 72 61 70 41 76 |xtEvent |= TrapAv|
|000015b0| 61 69 6c 61 62 6c 65 28 | 5f 57 61 69 74 4e 65 78 |ailable(|_WaitNex|
|000015c0| 74 45 76 65 6e 74 2c 20 | 54 6f 6f 6c 54 72 61 70 |tEvent, |ToolTrap|
|000015d0| 29 3b 0d 0d 09 2f 2f 20 | 69 6e 69 74 69 61 6c 69 |);...// |initiali|
|000015e0| 7a 65 20 6f 75 72 20 63 | 6c 61 73 73 20 76 61 72 |ze our c|lass var|
|000015f0| 69 61 62 6c 65 73 0d 09 | 66 43 75 72 44 6f 63 20 |iables..|fCurDoc |
|00001600| 3d 20 6e 69 6c 3b 0d 09 | 66 44 6f 6e 65 20 3d 20 |= nil;..|fDone = |
|00001610| 66 61 6c 73 65 3b 0d 09 | 66 49 6e 42 61 63 6b 67 |false;..|fInBackg|
|00001620| 72 6f 75 6e 64 20 3d 20 | 66 61 6c 73 65 3b 0d 09 |round = |false;..|
|00001630| 66 4d 6f 75 73 65 52 67 | 6e 20 3d 20 6e 69 6c 3b |fMouseRg|n = nil;|
|00001640| 0d 09 66 57 68 69 63 68 | 57 69 6e 64 6f 77 20 3d |..fWhich|Window =|
|00001650| 20 6e 69 6c 3b 0d 7d 0d | 0d 76 6f 69 64 20 54 41 | nil;.}.|.void TA|
|00001660| 70 70 6c 69 63 61 74 69 | 6f 6e 3a 3a 45 78 69 74 |pplicati|on::Exit|
|00001670| 4c 6f 6f 70 28 29 0d 7b | 0d 09 66 44 6f 6e 65 20 |Loop().{|..fDone |
|00001680| 3d 20 74 72 75 65 3b 0d | 7d 0d 0d 76 6f 69 64 20 |= true;.|}..void |
|00001690| 54 41 70 70 6c 69 63 61 | 74 69 6f 6e 3a 3a 45 76 |TApplica|tion::Ev|
|000016a0| 65 6e 74 4c 6f 6f 70 28 | 29 0d 7b 0d 09 69 6e 74 |entLoop(|).{..int|
|000016b0| 20 67 6f 74 45 76 65 6e | 74 3b 0d 09 45 76 65 6e | gotEven|t;..Even|
|000016c0| 74 52 65 63 6f 72 64 20 | 74 45 76 74 3b 0d 0d 09 |tRecord |tEvt;...|
|000016d0| 53 65 74 55 70 28 29 3b | 09 09 09 09 09 2f 2f 20 |SetUp();|.....// |
|000016e0| 63 61 6c 6c 20 73 65 74 | 75 70 20 72 6f 75 74 69 |call set|up routi|
|000016f0| 6e 65 0d 09 44 6f 49 64 | 6c 65 28 29 3b 09 09 09 |ne..DoId|le();...|
|00001700| 09 09 2f 2f 20 64 6f 20 | 69 64 6c 65 20 6f 6e 63 |..// do |idle onc|
|00001710| 65 0d 0d 09 77 68 69 6c | 65 20 28 66 44 6f 6e 65 |e...whil|e (fDone|
|00001720| 20 3d 3d 20 66 61 6c 73 | 65 29 0d 09 20 20 7b 0d | == fals|e).. {.|
|00001730| 09 09 2f 2f 20 61 6c 77 | 61 79 73 20 73 65 74 20 |..// alw|ays set |
|00001740| 75 70 20 66 57 68 69 63 | 68 57 69 6e 64 6f 77 20 |up fWhic|hWindow |
|00001750| 62 65 66 6f 72 65 20 64 | 6f 69 6e 67 20 61 6e 79 |before d|oing any|
|00001760| 74 68 69 6e 67 0d 09 09 | 66 57 68 69 63 68 57 69 |thing...|fWhichWi|
|00001770| 6e 64 6f 77 20 3d 20 46 | 72 6f 6e 74 57 69 6e 64 |ndow = F|rontWind|
|00001780| 6f 77 28 29 3b 0d 09 09 | 69 66 20 28 66 57 68 69 |ow();...|if (fWhi|
|00001790| 63 68 57 69 6e 64 6f 77 | 20 21 3d 20 6e 69 6c 29 |chWindow| != nil)|
|000017a0| 0d 09 09 20 20 7b 0d 09 | 09 09 2f 2f 20 73 65 65 |... {..|..// see|
|000017b0| 20 69 66 20 77 69 6e 64 | 6f 77 20 62 65 6c 6f 6e | if wind|ow belon|
|000017c0| 67 73 20 74 6f 20 61 20 | 64 6f 63 75 6d 65 6e 74 |gs to a |document|
|000017d0| 0d 09 09 09 66 43 75 72 | 44 6f 63 20 3d 20 66 44 |....fCur|Doc = fD|
|000017e0| 6f 63 4c 69 73 74 2d 3e | 46 69 6e 64 44 6f 63 28 |ocList->|FindDoc(|
|000017f0| 66 57 68 69 63 68 57 69 | 6e 64 6f 77 29 3b 0d 09 |fWhichWi|ndow);..|
|00001800| 09 09 2f 2f 20 6d 61 6b | 65 20 73 75 72 65 20 77 |..// mak|e sure w|
|00001810| 65 20 61 6c 77 61 79 73 | 20 64 72 61 77 20 69 6e |e always| draw in|
|00001820| 74 6f 20 63 6f 72 72 65 | 63 74 20 77 69 6e 64 6f |to corre|ct windo|
|00001830| 77 0d 09 09 09 53 65 74 | 50 6f 72 74 28 66 57 68 |w....Set|Port(fWh|
|00001840| 69 63 68 57 69 6e 64 6f | 77 29 3b 0d 09 09 20 20 |ichWindo|w);... |
|00001850| 7d 0d 09 09 65 6c 73 65 | 20 66 43 75 72 44 6f 63 |}...else| fCurDoc|
|00001860| 20 3d 20 6e 69 6c 3b 0d | 0d 09 09 44 6f 49 64 6c | = nil;.|...DoIdl|
|00001870| 65 28 29 3b 09 09 09 2f | 2f 20 63 61 6c 6c 20 69 |e();.../|/ call i|
|00001880| 64 6c 65 20 74 69 6d 65 | 20 68 61 6e 64 6c 65 72 |dle time| handler|
|00001890| 0d 09 09 0d 09 09 69 66 | 20 28 66 48 61 76 65 57 |......if| (fHaveW|
|000018a0| 61 69 74 4e 65 78 74 45 | 76 65 6e 74 29 0d 09 09 |aitNextE|vent)...|
|000018b0| 20 20 7b 0d 09 09 09 67 | 6f 74 45 76 65 6e 74 20 | {....g|otEvent |
|000018c0| 3d 20 57 61 69 74 4e 65 | 78 74 45 76 65 6e 74 28 |= WaitNe|xtEvent(|
|000018d0| 65 76 65 72 79 45 76 65 | 6e 74 2c 20 26 74 45 76 |everyEve|nt, &tEv|
|000018e0| 74 2c 20 53 6c 65 65 70 | 56 61 6c 28 29 2c 20 66 |t, Sleep|Val(), f|
|000018f0| 4d 6f 75 73 65 52 67 6e | 29 3b 0d 09 09 20 20 7d |MouseRgn|);... }|
|00001900| 0d 09 09 65 6c 73 65 0d | 09 09 20 20 7b 0d 09 09 |...else.|.. {...|
|00001910| 09 53 79 73 74 65 6d 54 | 61 73 6b 28 29 3b 0d 09 |.SystemT|ask();..|
|00001920| 09 09 67 6f 74 45 76 65 | 6e 74 20 3d 20 47 65 74 |..gotEve|nt = Get|
|00001930| 4e 65 78 74 45 76 65 6e | 74 28 65 76 65 72 79 45 |NextEven|t(everyE|
|00001940| 76 65 6e 74 2c 20 26 74 | 45 76 74 29 3b 0d 09 09 |vent, &t|Evt);...|
|00001950| 20 20 7d 0d 09 09 66 54 | 68 65 45 76 65 6e 74 20 | }...fT|heEvent |
|00001960| 3d 20 74 45 76 74 3b 0d | 0d 09 09 2f 2f 20 6d 61 |= tEvt;.|...// ma|
|00001970| 6b 65 20 73 75 72 65 20 | 77 65 20 67 6f 74 20 61 |ke sure |we got a|
|00001980| 20 72 65 61 6c 20 65 76 | 65 6e 74 0d 09 09 69 66 | real ev|ent...if|
|00001990| 20 28 20 67 6f 74 45 76 | 65 6e 74 20 29 0d 09 09 | ( gotEv|ent )...|
|000019a0| 20 20 7b 0d 09 09 09 41 | 64 6a 75 73 74 43 75 72 | {....A|djustCur|
|000019b0| 73 6f 72 28 29 3b 0d 09 | 09 09 73 77 69 74 63 68 |sor();..|..switch|
|000019c0| 20 28 66 54 68 65 45 76 | 65 6e 74 2e 77 68 61 74 | (fTheEv|ent.what|
|000019d0| 29 0d 09 09 09 20 20 7b | 0d 09 09 09 09 63 61 73 |).... {|.....cas|
|000019e0| 65 20 6d 6f 75 73 65 44 | 6f 77 6e 20 3a 0d 09 09 |e mouseD|own :...|
|000019f0| 09 09 09 44 6f 4d 6f 75 | 73 65 44 6f 77 6e 28 29 |...DoMou|seDown()|
|00001a00| 3b 0d 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |;......b|reak;...|
|00001a10| 09 09 63 61 73 65 20 6d | 6f 75 73 65 55 70 20 3a |..case m|ouseUp :|
|00001a20| 0d 09 09 09 09 09 44 6f | 4d 6f 75 73 65 55 70 28 |......Do|MouseUp(|
|00001a30| 29 3b 0d 09 09 09 09 09 | 62 72 65 61 6b 3b 0d 09 |);......|break;..|
|00001a40| 09 09 09 63 61 73 65 20 | 6b 65 79 44 6f 77 6e 20 |...case |keyDown |
|00001a50| 3a 0d 09 09 09 09 63 61 | 73 65 20 61 75 74 6f 4b |:.....ca|se autoK|
|00001a60| 65 79 20 3a 0d 09 09 09 | 09 09 44 6f 4b 65 79 44 |ey :....|..DoKeyD|
|00001a70| 6f 77 6e 28 29 3b 0d 09 | 09 09 09 09 62 72 65 61 |own();..|....brea|
|00001a80| 6b 3b 0d 09 09 09 09 63 | 61 73 65 20 75 70 64 61 |k;.....c|ase upda|
|00001a90| 74 65 45 76 74 20 3a 0d | 09 09 09 09 09 44 6f 55 |teEvt :.|.....DoU|
|00001aa0| 70 64 61 74 65 45 76 74 | 28 29 3b 09 09 09 09 0d |pdateEvt|();.....|
|00001ab0| 09 09 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 09 09 |.....bre|ak;.....|
|00001ac0| 63 61 73 65 20 64 69 73 | 6b 45 76 74 20 3a 0d 09 |case dis|kEvt :..|
|00001ad0| 09 09 09 09 44 6f 44 69 | 73 6b 45 76 74 28 29 3b |....DoDi|skEvt();|
|00001ae0| 0d 09 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |......br|eak;....|
|00001af0| 09 63 61 73 65 20 61 63 | 74 69 76 61 74 65 45 76 |.case ac|tivateEv|
|00001b00| 74 20 3a 0d 09 09 09 09 | 09 44 6f 41 63 74 69 76 |t :.....|.DoActiv|
|00001b10| 61 74 65 45 76 74 28 29 | 3b 0d 09 09 09 09 09 62 |ateEvt()|;......b|
|00001b20| 72 65 61 6b 3b 0d 09 09 | 09 09 63 61 73 65 20 6b |reak;...|..case k|
|00001b30| 4f 73 45 76 65 6e 74 20 | 3a 0d 09 09 09 09 09 44 |OsEvent |:......D|
|00001b40| 6f 4f 53 45 76 65 6e 74 | 28 29 3b 0d 09 09 09 09 |oOSEvent|();.....|
|00001b50| 09 62 72 65 61 6b 3b 0d | 09 09 09 09 64 65 66 61 |.break;.|....defa|
|00001b60| 75 6c 74 20 3a 0d 09 09 | 09 09 09 62 72 65 61 6b |ult :...|...break|
|00001b70| 3b 0d 09 09 09 20 20 7d | 20 2f 2f 20 65 6e 64 20 |;.... }| // end |
|00001b80| 73 77 69 74 63 68 20 28 | 66 54 68 65 45 76 65 6e |switch (|fTheEven|
|00001b90| 74 2e 77 68 61 74 29 0d | 09 09 20 20 7d 0d 09 09 |t.what).|.. }...|
|00001ba0| 41 64 6a 75 73 74 43 75 | 72 73 6f 72 28 29 3b 0d |AdjustCu|rsor();.|
|00001bb0| 09 20 20 7d 0d 09 2f 2f | 20 63 61 6c 6c 20 63 6c |. }..//| call cl|
|00001bc0| 65 61 6e 75 70 20 68 61 | 6e 64 6c 65 72 0d 09 43 |eanup ha|ndler..C|
|00001bd0| 6c 65 61 6e 55 70 28 29 | 3b 0d 7d 0d 0d 76 6f 69 |leanUp()|;.}..voi|
|00001be0| 64 20 54 41 70 70 6c 69 | 63 61 74 69 6f 6e 3a 3a |d TAppli|cation::|
|00001bf0| 44 6f 4b 65 79 44 6f 77 | 6e 28 29 0d 7b 0d 09 63 |DoKeyDow|n().{..c|
|00001c00| 68 61 72 20 6b 65 79 3b | 0d 09 6c 6f 6e 67 20 6d |har key;|..long m|
|00001c10| 52 65 73 75 6c 74 3b 0d | 0d 09 6b 65 79 20 3d 20 |Result;.|..key = |
|00001c20| 28 63 68 61 72 29 20 28 | 66 54 68 65 45 76 65 6e |(char) (|fTheEven|
|00001c30| 74 2e 6d 65 73 73 61 67 | 65 20 26 20 63 68 61 72 |t.messag|e & char|
|00001c40| 43 6f 64 65 4d 61 73 6b | 29 3b 0d 09 69 66 20 28 |CodeMask|);..if (|
|00001c50| 28 66 54 68 65 45 76 65 | 6e 74 2e 6d 6f 64 69 66 |(fTheEve|nt.modif|
|00001c60| 69 65 72 73 20 26 20 63 | 6d 64 4b 65 79 29 20 26 |iers & c|mdKey) &|
|00001c70| 26 20 28 66 54 68 65 45 | 76 65 6e 74 2e 77 68 61 |& (fTheE|vent.wha|
|00001c80| 74 20 3d 3d 20 6b 65 79 | 44 6f 77 6e 29 29 0d 09 |t == key|Down))..|
|00001c90| 20 20 7b 0d 09 09 2f 2f | 20 6f 6e 6c 79 20 64 6f | {...//| only do|
|00001ca0| 20 63 6f 6d 6d 61 6e 64 | 20 6b 65 79 73 20 69 66 | command| keys if|
|00001cb0| 20 77 65 20 61 72 65 20 | 6e 6f 74 20 61 75 74 6f | we are |not auto|
|00001cc0| 6b 65 79 69 6e 67 0d 09 | 09 41 64 6a 75 73 74 4d |keying..|.AdjustM|
|00001cd0| 65 6e 75 73 28 29 3b 09 | 09 09 09 09 2f 2f 20 6d |enus();.|....// m|
|00001ce0| 61 6b 65 20 73 75 72 65 | 20 6d 65 6e 75 73 20 61 |ake sure| menus a|
|00001cf0| 72 65 20 75 70 20 74 6f | 20 64 61 74 65 0d 09 09 |re up to| date...|
|00001d00| 6d 52 65 73 75 6c 74 20 | 3d 20 4d 65 6e 75 4b 65 |mResult |= MenuKe|
|00001d10| 79 28 6b 65 79 29 3b 0d | 09 09 69 66 20 28 6d 52 |y(key);.|..if (mR|
|00001d20| 65 73 75 6c 74 20 21 3d | 20 30 29 09 09 09 09 2f |esult !=| 0)..../|
|00001d30| 2f 20 69 66 20 69 74 20 | 77 61 73 6e 27 74 20 61 |/ if it |wasn't a|
|00001d40| 20 6d 65 6e 75 20 6b 65 | 79 2c 20 70 61 73 73 20 | menu ke|y, pass |
|00001d50| 69 74 20 74 68 72 6f 75 | 67 68 0d 09 09 20 20 7b |it throu|gh... {|
|00001d60| 0d 09 09 09 44 6f 4d 65 | 6e 75 43 6f 6d 6d 61 6e |....DoMe|nuComman|
|00001d70| 64 28 48 69 57 72 64 28 | 6d 52 65 73 75 6c 74 29 |d(HiWrd(|mResult)|
|00001d80| 2c 20 4c 6f 57 72 64 28 | 6d 52 65 73 75 6c 74 29 |, LoWrd(|mResult)|
|00001d90| 29 3b 0d 09 09 09 72 65 | 74 75 72 6e 3b 0d 09 09 |);....re|turn;...|
|00001da0| 20 20 7d 0d 09 20 20 7d | 0d 09 69 66 20 28 66 43 | }.. }|..if (fC|
|00001db0| 75 72 44 6f 63 20 21 3d | 20 6e 69 6c 29 0d 09 20 |urDoc !=| nil).. |
|00001dc0| 20 7b 0d 09 09 45 76 65 | 6e 74 52 65 63 6f 72 64 | {...Eve|ntRecord|
|00001dd0| 20 74 45 76 74 3b 0d 0d | 09 09 2f 2f 20 77 65 20 | tEvt;..|..// we |
|00001de0| 63 6f 70 79 20 65 76 65 | 6e 74 20 72 65 63 6f 72 |copy eve|nt recor|
|00001df0| 64 20 73 6f 20 74 68 61 | 74 20 77 65 20 64 6f 6e |d so tha|t we don|
|00001e00| 27 74 20 70 61 73 73 20 | 72 65 66 65 72 65 6e 63 |'t pass |referenc|
|00001e10| 65 20 74 6f 20 6f 62 6a | 65 63 74 20 66 69 65 6c |e to obj|ect fiel|
|00001e20| 64 20 0d 09 09 74 45 76 | 74 20 3d 20 66 54 68 65 |d ...tEv|t = fThe|
|00001e30| 45 76 65 6e 74 3b 0d 09 | 09 66 43 75 72 44 6f 63 |Event;..|.fCurDoc|
|00001e40| 2d 3e 44 6f 4b 65 79 44 | 6f 77 6e 28 26 74 45 76 |->DoKeyD|own(&tEv|
|00001e50| 74 29 3b 0d 09 20 20 7d | 0d 7d 0d 0d 76 6f 69 64 |t);.. }|.}..void|
|00001e60| 20 54 41 70 70 6c 69 63 | 61 74 69 6f 6e 3a 3a 44 | TApplic|ation::D|
|00001e70| 6f 41 63 74 69 76 61 74 | 65 45 76 74 28 29 0d 7b |oActivat|eEvt().{|
|00001e80| 0d 09 2f 2f 20 65 76 65 | 6e 74 20 72 65 63 6f 72 |..// eve|nt recor|
|00001e90| 64 20 63 6f 6e 74 61 69 | 6e 73 20 77 69 6e 64 6f |d contai|ns windo|
|00001ea0| 77 20 70 74 72 0d 09 66 | 57 68 69 63 68 57 69 6e |w ptr..f|WhichWin|
|00001eb0| 64 6f 77 20 3d 20 28 57 | 69 6e 64 6f 77 50 74 72 |dow = (W|indowPtr|
|00001ec0| 29 20 66 54 68 65 45 76 | 65 6e 74 2e 6d 65 73 73 |) fTheEv|ent.mess|
|00001ed0| 61 67 65 3b 0d 09 2f 2f | 20 73 65 65 20 69 66 20 |age;..//| see if |
|00001ee0| 77 69 6e 64 6f 77 20 62 | 65 6c 6f 6e 67 73 20 74 |window b|elongs t|
|00001ef0| 6f 20 61 20 64 6f 63 75 | 6d 65 6e 74 0d 09 66 43 |o a docu|ment..fC|
|00001f00| 75 72 44 6f 63 20 3d 20 | 66 44 6f 63 4c 69 73 74 |urDoc = |fDocList|
|00001f10| 2d 3e 46 69 6e 64 44 6f | 63 28 66 57 68 69 63 68 |->FindDo|c(fWhich|
|00001f20| 57 69 6e 64 6f 77 29 3b | 0d 09 53 65 74 50 6f 72 |Window);|..SetPor|
|00001f30| 74 28 66 57 68 69 63 68 | 57 69 6e 64 6f 77 29 3b |t(fWhich|Window);|
|00001f40| 0d 0d 09 69 66 20 28 66 | 43 75 72 44 6f 63 20 21 |...if (f|CurDoc !|
|00001f50| 3d 20 6e 69 6c 29 0d 09 | 20 20 66 43 75 72 44 6f |= nil)..| fCurDo|
|00001f60| 63 2d 3e 44 6f 41 63 74 | 69 76 61 74 65 28 28 66 |c->DoAct|ivate((f|
|00001f70| 54 68 65 45 76 65 6e 74 | 2e 6d 6f 64 69 66 69 65 |TheEvent|.modifie|
|00001f80| 72 73 20 26 20 61 63 74 | 69 76 65 46 6c 61 67 29 |rs & act|iveFlag)|
|00001f90| 20 21 3d 20 30 29 3b 0d | 7d 0d 0d 76 6f 69 64 20 | != 0);.|}..void |
|00001fa0| 54 41 70 70 6c 69 63 61 | 74 69 6f 6e 3a 3a 44 6f |TApplica|tion::Do|
|00001fb0| 55 70 64 61 74 65 45 76 | 74 28 29 0d 7b 0d 09 2f |UpdateEv|t().{../|
|00001fc0| 2f 20 65 76 65 6e 74 20 | 72 65 63 6f 72 64 20 63 |/ event |record c|
|00001fd0| 6f 6e 74 61 69 6e 73 20 | 77 69 6e 64 6f 77 20 70 |ontains |window p|
|00001fe0| 74 72 0d 09 66 57 68 69 | 63 68 57 69 6e 64 6f 77 |tr..fWhi|chWindow|
|00001ff0| 20 3d 20 28 57 69 6e 64 | 6f 77 50 74 72 29 20 66 | = (Wind|owPtr) f|
|00002000| 54 68 65 45 76 65 6e 74 | 2e 6d 65 73 73 61 67 65 |TheEvent|.message|
|00002010| 3b 0d 09 2f 2f 20 73 65 | 65 20 69 66 20 77 69 6e |;..// se|e if win|
|00002020| 64 6f 77 20 62 65 6c 6f | 6e 67 73 20 74 6f 20 61 |dow belo|ngs to a|
|00002030| 20 64 6f 63 75 6d 65 6e | 74 0d 09 66 43 75 72 44 | documen|t..fCurD|
|00002040| 6f 63 20 3d 20 66 44 6f | 63 4c 69 73 74 2d 3e 46 |oc = fDo|cList->F|
|00002050| 69 6e 64 44 6f 63 28 66 | 57 68 69 63 68 57 69 6e |indDoc(f|WhichWin|
|00002060| 64 6f 77 29 3b 0d 09 53 | 65 74 50 6f 72 74 28 66 |dow);..S|etPort(f|
|00002070| 57 68 69 63 68 57 69 6e | 64 6f 77 29 3b 0d 0d 09 |WhichWin|dow);...|
|00002080| 69 66 20 28 66 43 75 72 | 44 6f 63 20 21 3d 20 6e |if (fCur|Doc != n|
|00002090| 69 6c 29 0d 09 20 20 66 | 43 75 72 44 6f 63 2d 3e |il).. f|CurDoc->|
|000020a0| 44 6f 55 70 64 61 74 65 | 28 29 3b 0d 7d 0d 0d 2f |DoUpdate|();.}../|
|000020b0| 2f 20 4e 4f 54 45 3a 20 | 77 65 20 75 73 65 20 61 |/ NOTE: |we use a|
|000020c0| 6e 20 61 6e 6f 6e 79 6d | 6f 75 73 20 70 61 72 61 |n anonym|ous para|
|000020d0| 6d 65 74 65 72 20 68 65 | 72 65 20 73 6f 20 74 68 |meter he|re so th|
|000020e0| 61 74 20 74 68 65 20 63 | 6f 6d 70 69 6c 65 72 0d |at the c|ompiler.|
|000020f0| 2f 2f 20 64 6f 65 73 6e | 27 74 20 77 61 72 6e 20 |// doesn|'t warn |
|00002100| 75 73 20 61 62 6f 75 74 | 20 69 74 20 62 65 69 6e |us about| it bein|
|00002110| 67 20 75 6e 75 73 65 64 | 2e 20 53 69 6e 63 65 20 |g unused|. Since |
|00002120| 77 65 20 67 69 76 65 20 | 69 74 20 61 20 6e 61 6d |we give |it a nam|
|00002130| 65 0d 2f 2f 20 69 6e 20 | 74 68 65 20 63 6c 61 73 |e.// in |the clas|
|00002140| 73 20 64 65 66 69 6e 69 | 74 69 6f 6e 2c 20 77 65 |s defini|tion, we|
|00002150| 20 73 74 69 6c 6c 20 6b | 6e 6f 77 20 77 68 61 74 | still k|now what|
|00002160| 20 69 74 73 20 75 73 65 | 64 20 66 6f 72 2e 0d 76 | its use|d for..v|
|00002170| 6f 69 64 20 54 41 70 70 | 6c 69 63 61 74 69 6f 6e |oid TApp|lication|
|00002180| 3a 3a 44 6f 53 75 73 70 | 65 6e 64 28 42 6f 6f 6c |::DoSusp|end(Bool|
|00002190| 65 61 6e 29 0d 7b 0d 09 | 69 66 20 28 66 43 75 72 |ean).{..|if (fCur|
|000021a0| 44 6f 63 20 21 3d 20 6e | 69 6c 29 0d 09 20 20 66 |Doc != n|il).. f|
|000021b0| 43 75 72 44 6f 63 2d 3e | 44 6f 41 63 74 69 76 61 |CurDoc->|DoActiva|
|000021c0| 74 65 28 21 66 49 6e 42 | 61 63 6b 67 72 6f 75 6e |te(!fInB|ackgroun|
|000021d0| 64 29 3b 0d 7d 0d 0d 76 | 6f 69 64 20 54 41 70 70 |d);.}..v|oid TApp|
|000021e0| 6c 69 63 61 74 69 6f 6e | 3a 3a 44 6f 52 65 73 75 |lication|::DoResu|
|000021f0| 6d 65 28 42 6f 6f 6c 65 | 61 6e 29 0d 7b 0d 09 69 |me(Boole|an).{..i|
|00002200| 66 20 28 66 43 75 72 44 | 6f 63 20 21 3d 20 6e 69 |f (fCurD|oc != ni|
|00002210| 6c 29 0d 09 20 20 66 43 | 75 72 44 6f 63 2d 3e 44 |l).. fC|urDoc->D|
|00002220| 6f 41 63 74 69 76 61 74 | 65 28 21 66 49 6e 42 61 |oActivat|e(!fInBa|
|00002230| 63 6b 67 72 6f 75 6e 64 | 29 3b 0d 7d 0d 0d 76 6f |ckground|);.}..vo|
|00002240| 69 64 20 54 41 70 70 6c | 69 63 61 74 69 6f 6e 3a |id TAppl|ication:|
|00002250| 3a 44 6f 4f 53 45 76 65 | 6e 74 28 29 0d 7b 0d 09 |:DoOSEve|nt().{..|
|00002260| 42 6f 6f 6c 65 61 6e 20 | 64 6f 43 6f 6e 76 65 72 |Boolean |doConver|
|00002270| 74 3b 0d 09 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |t;..unsi|gned cha|
|00002280| 72 20 65 76 54 79 70 65 | 3b 0d 0d 09 2f 2f 20 69 |r evType|;...// i|
|00002290| 73 20 69 74 20 61 20 6d | 75 6c 74 69 66 69 6e 64 |s it a m|ultifind|
|000022a0| 65 72 20 65 76 65 6e 74 | 3f 0d 09 65 76 54 79 70 |er event|?..evTyp|
|000022b0| 65 20 3d 20 28 75 6e 73 | 69 67 6e 65 64 20 63 68 |e = (uns|igned ch|
|000022c0| 61 72 29 20 28 66 54 68 | 65 45 76 65 6e 74 2e 6d |ar) (fTh|eEvent.m|
|000022d0| 65 73 73 61 67 65 20 3e | 3e 20 32 34 29 20 26 20 |essage >|> 24) & |
|000022e0| 30 78 30 30 66 66 3b 0d | 09 73 77 69 74 63 68 20 |0x00ff;.|.switch |
|000022f0| 28 65 76 54 79 70 65 29 | 20 7b 20 09 2f 2f 20 68 |(evType)| { .// h|
|00002300| 69 67 68 20 62 79 74 65 | 20 6f 66 20 6d 65 73 73 |igh byte| of mess|
|00002310| 61 67 65 20 69 73 20 74 | 79 70 65 20 6f 66 20 65 |age is t|ype of e|
|00002320| 76 65 6e 74 0d 09 09 63 | 61 73 65 20 6b 4d 6f 75 |vent...c|ase kMou|
|00002330| 73 65 4d 6f 76 65 64 4d | 65 73 73 61 67 65 20 3a |seMovedM|essage :|
|00002340| 0d 09 09 09 44 6f 49 64 | 6c 65 28 29 3b 09 09 09 |....DoId|le();...|
|00002350| 09 09 2f 2f 20 6d 6f 75 | 73 65 2d 6d 6f 76 65 64 |..// mou|se-moved|
|00002360| 20 69 73 20 61 6c 73 6f | 20 61 6e 20 69 64 6c 65 | is also| an idle|
|00002370| 20 65 76 65 6e 74 0d 09 | 09 09 62 72 65 61 6b 3b | event..|..break;|
|00002380| 0d 09 09 63 61 73 65 20 | 6b 53 75 73 70 65 6e 64 |...case |kSuspend|
|00002390| 52 65 73 75 6d 65 4d 65 | 73 73 61 67 65 20 3a 0d |ResumeMe|ssage :.|
|000023a0| 09 09 09 64 6f 43 6f 6e | 76 65 72 74 20 3d 20 28 |...doCon|vert = (|
|000023b0| 66 54 68 65 45 76 65 6e | 74 2e 6d 65 73 73 61 67 |fTheEven|t.messag|
|000023c0| 65 20 26 20 6b 43 6c 69 | 70 43 6f 6e 76 65 72 74 |e & kCli|pConvert|
|000023d0| 4d 61 73 6b 29 20 21 3d | 20 30 3b 0d 09 09 09 66 |Mask) !=| 0;....f|
|000023e0| 49 6e 42 61 63 6b 67 72 | 6f 75 6e 64 20 3d 20 28 |InBackgr|ound = (|
|000023f0| 66 54 68 65 45 76 65 6e | 74 2e 6d 65 73 73 61 67 |fTheEven|t.messag|
|00002400| 65 20 26 20 6b 52 65 73 | 75 6d 65 4d 61 73 6b 29 |e & kRes|umeMask)|
|00002410| 20 3d 3d 20 30 3b 0d 09 | 09 09 69 66 20 28 66 49 | == 0;..|..if (fI|
|00002420| 6e 42 61 63 6b 67 72 6f | 75 6e 64 29 0d 09 09 09 |nBackgro|und)....|
|00002430| 20 20 44 6f 53 75 73 70 | 65 6e 64 28 64 6f 43 6f | DoSusp|end(doCo|
|00002440| 6e 76 65 72 74 29 3b 0d | 09 09 09 65 6c 73 65 20 |nvert);.|...else |
|00002450| 44 6f 52 65 73 75 6d 65 | 28 64 6f 43 6f 6e 76 65 |DoResume|(doConve|
|00002460| 72 74 29 3b 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |rt);....|break;..|
|00002470| 7d 0d 7d 0d 0d 76 6f 69 | 64 20 54 41 70 70 6c 69 |}.}..voi|d TAppli|
|00002480| 63 61 74 69 6f 6e 3a 3a | 44 6f 4d 6f 75 73 65 44 |cation::|DoMouseD|
|00002490| 6f 77 6e 28 29 0d 7b 0d | 09 6c 6f 6e 67 20 6d 52 |own().{.|.long mR|
|000024a0| 65 73 75 6c 74 3b 0d 09 | 73 68 6f 72 74 20 70 61 |esult;..|short pa|
|000024b0| 72 74 43 6f 64 65 3b 0d | 09 57 69 6e 64 6f 77 50 |rtCode;.|.WindowP|
|000024c0| 74 72 20 74 57 69 6e 64 | 3b 0d 09 45 76 65 6e 74 |tr tWind|;..Event|
|000024d0| 52 65 63 6f 72 64 20 74 | 45 76 74 3b 0d 0d 09 2f |Record t|Evt;.../|
|000024e0| 2f 20 67 6f 74 74 61 20 | 77 61 74 63 68 20 74 68 |/ gotta |watch th|
|000024f0| 6f 73 65 20 6f 62 6a 65 | 63 74 20 66 69 65 6c 64 |ose obje|ct field|
|00002500| 20 64 65 72 65 66 65 72 | 65 6e 63 65 73 0d 09 70 | derefer|ences..p|
|00002510| 61 72 74 43 6f 64 65 20 | 3d 20 46 69 6e 64 57 69 |artCode |= FindWi|
|00002520| 6e 64 6f 77 28 66 54 68 | 65 45 76 65 6e 74 2e 77 |ndow(fTh|eEvent.w|
|00002530| 68 65 72 65 2c 20 26 74 | 57 69 6e 64 29 3b 0d 09 |here, &t|Wind);..|
|00002540| 66 57 68 69 63 68 57 69 | 6e 64 6f 77 20 3d 20 74 |fWhichWi|ndow = t|
|00002550| 57 69 6e 64 3b 0d 09 74 | 45 76 74 20 3d 20 66 54 |Wind;..t|Evt = fT|
|00002560| 68 65 45 76 65 6e 74 3b | 0d 09 73 77 69 74 63 68 |heEvent;|..switch|
|00002570| 20 28 70 61 72 74 43 6f | 64 65 29 0d 09 20 20 7b | (partCo|de).. {|
|00002580| 0d 09 09 63 61 73 65 20 | 69 6e 53 79 73 57 69 6e |...case |inSysWin|
|00002590| 64 6f 77 20 3a 0d 09 09 | 09 44 6f 4d 6f 75 73 65 |dow :...|.DoMouse|
|000025a0| 49 6e 53 79 73 57 69 6e | 64 6f 77 28 29 3b 0d 09 |InSysWin|dow();..|
|000025b0| 09 09 62 72 65 61 6b 3b | 0d 09 09 63 61 73 65 20 |..break;|...case |
|000025c0| 69 6e 4d 65 6e 75 42 61 | 72 20 3a 0d 09 09 09 41 |inMenuBa|r :....A|
|000025d0| 64 6a 75 73 74 4d 65 6e | 75 73 28 29 3b 0d 09 09 |djustMen|us();...|
|000025e0| 09 6d 52 65 73 75 6c 74 | 20 3d 20 4d 65 6e 75 53 |.mResult| = MenuS|
|000025f0| 65 6c 65 63 74 28 74 45 | 76 74 2e 77 68 65 72 65 |elect(tE|vt.where|
|00002600| 29 3b 0d 09 09 09 69 66 | 20 28 6d 52 65 73 75 6c |);....if| (mResul|
|00002610| 74 20 21 3d 20 30 29 0d | 09 09 09 20 20 44 6f 4d |t != 0).|... DoM|
|00002620| 65 6e 75 43 6f 6d 6d 61 | 6e 64 28 48 69 57 72 64 |enuComma|nd(HiWrd|
|00002630| 28 6d 52 65 73 75 6c 74 | 29 2c 4c 6f 57 72 64 28 |(mResult|),LoWrd(|
|00002640| 6d 52 65 73 75 6c 74 29 | 29 3b 0d 09 09 09 62 72 |mResult)|);....br|
|00002650| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 69 6e 47 6f |eak;...c|ase inGo|
|00002660| 41 77 61 79 20 3a 0d 09 | 09 09 44 6f 47 6f 41 77 |Away :..|..DoGoAw|
|00002670| 61 79 28 29 3b 09 09 09 | 09 09 0d 09 09 09 62 72 |ay();...|......br|
|00002680| 65 61 6b 3b 0d 09 09 63 | 61 73 65 20 69 6e 44 72 |eak;...c|ase inDr|
|00002690| 61 67 20 3a 0d 09 09 09 | 44 6f 44 72 61 67 28 29 |ag :....|DoDrag()|
|000026a0| 3b 0d 09 09 09 62 72 65 | 61 6b 3b 0d 09 09 63 61 |;....bre|ak;...ca|
|000026b0| 73 65 20 69 6e 47 72 6f | 77 20 3a 0d 09 09 09 69 |se inGro|w :....i|
|000026c0| 66 20 28 66 43 75 72 44 | 6f 63 20 21 3d 20 6e 69 |f (fCurD|oc != ni|
|000026d0| 6c 29 0d 09 09 09 20 20 | 66 43 75 72 44 6f 63 2d |l).... |fCurDoc-|
|000026e0| 3e 44 6f 47 72 6f 77 28 | 26 74 45 76 74 29 3b 09 |>DoGrow(|&tEvt);.|
|000026f0| 09 09 09 09 0d 09 09 09 | 62 72 65 61 6b 3b 0d 09 |........|break;..|
|00002700| 09 63 61 73 65 20 69 6e | 5a 6f 6f 6d 49 6e 20 3a |.case in|ZoomIn :|
|00002710| 0d 09 09 63 61 73 65 20 | 69 6e 5a 6f 6f 6d 4f 75 |...case |inZoomOu|
|00002720| 74 20 3a 0d 09 09 09 69 | 66 20 28 28 54 72 61 63 |t :....i|f ((Trac|
|00002730| 6b 42 6f 78 28 66 57 68 | 69 63 68 57 69 6e 64 6f |kBox(fWh|ichWindo|
|00002740| 77 2c 20 74 45 76 74 2e | 77 68 65 72 65 2c 20 70 |w, tEvt.|where, p|
|00002750| 61 72 74 43 6f 64 65 29 | 29 20 26 26 0d 09 09 09 |artCode)|) &&....|
|00002760| 09 28 66 43 75 72 44 6f | 63 20 21 3d 20 6e 69 6c |.(fCurDo|c != nil|
|00002770| 29 29 0d 09 09 09 20 20 | 66 43 75 72 44 6f 63 2d |)).... |fCurDoc-|
|00002780| 3e 44 6f 5a 6f 6f 6d 28 | 70 61 72 74 43 6f 64 65 |>DoZoom(|partCode|
|00002790| 29 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |);....br|eak;...c|
|000027a0| 61 73 65 20 69 6e 43 6f | 6e 74 65 6e 74 20 3a 0d |ase inCo|ntent :.|
|000027b0| 09 09 09 2f 2f 20 49 66 | 20 77 69 6e 64 6f 77 20 |...// If| window |
|000027c0| 69 73 20 6e 6f 74 20 69 | 6e 20 66 72 6f 6e 74 2c |is not i|n front,|
|000027d0| 20 6d 61 6b 65 20 69 74 | 20 73 6f 0d 09 09 09 69 | make it| so....i|
|000027e0| 66 20 28 20 66 57 68 69 | 63 68 57 69 6e 64 6f 77 |f ( fWhi|chWindow|
|000027f0| 20 21 3d 20 46 72 6f 6e | 74 57 69 6e 64 6f 77 28 | != Fron|tWindow(|
|00002800| 29 20 29 0d 09 09 09 20 | 20 53 65 6c 65 63 74 57 |) ).... | SelectW|
|00002810| 69 6e 64 6f 77 28 66 57 | 68 69 63 68 57 69 6e 64 |indow(fW|hichWind|
|00002820| 6f 77 29 3b 0d 09 09 09 | 65 6c 73 65 20 69 66 20 |ow);....|else if |
|00002830| 28 66 43 75 72 44 6f 63 | 20 21 3d 20 6e 69 6c 29 |(fCurDoc| != nil)|
|00002840| 0d 09 09 09 20 20 66 43 | 75 72 44 6f 63 2d 3e 44 |.... fC|urDoc->D|
|00002850| 6f 43 6f 6e 74 65 6e 74 | 28 26 74 45 76 74 29 3b |oContent|(&tEvt);|
|00002860| 09 09 09 09 09 0d 09 09 | 09 62 72 65 61 6b 3b 0d |........|.break;.|
|00002870| 09 20 20 7d 0d 7d 0d 0d | 76 6f 69 64 20 54 41 70 |. }.}..|void TAp|
|00002880| 70 6c 69 63 61 74 69 6f | 6e 3a 3a 44 6f 44 72 61 |plicatio|n::DoDra|
|00002890| 67 28 29 0d 7b 0d 09 44 | 72 61 67 57 69 6e 64 6f |g().{..D|ragWindo|
|000028a0| 77 28 66 57 68 69 63 68 | 57 69 6e 64 6f 77 2c 20 |w(fWhich|Window, |
|000028b0| 66 54 68 65 45 76 65 6e | 74 2e 77 68 65 72 65 2c |fTheEven|t.where,|
|000028c0| 20 26 71 64 2e 73 63 72 | 65 65 6e 42 69 74 73 2e | &qd.scr|eenBits.|
|000028d0| 62 6f 75 6e 64 73 29 3b | 0d 7d 0d 0d 76 6f 69 64 |bounds);|.}..void|
|000028e0| 20 54 41 70 70 6c 69 63 | 61 74 69 6f 6e 3a 3a 44 | TApplic|ation::D|
|000028f0| 6f 47 6f 41 77 61 79 28 | 29 0d 7b 0d 09 69 66 20 |oGoAway(|).{..if |
|00002900| 28 54 72 61 63 6b 47 6f | 41 77 61 79 28 66 57 68 |(TrackGo|Away(fWh|
|00002910| 69 63 68 57 69 6e 64 6f | 77 2c 20 66 54 68 65 45 |ichWindo|w, fTheE|
|00002920| 76 65 6e 74 2e 77 68 65 | 72 65 29 29 0d 09 20 20 |vent.whe|re)).. |
|00002930| 7b 0d 09 09 69 66 20 28 | 66 43 75 72 44 6f 63 20 |{...if (|fCurDoc |
|00002940| 21 3d 20 6e 69 6c 29 0d | 09 09 20 20 7b 0d 09 09 |!= nil).|.. {...|
|00002950| 09 66 44 6f 63 4c 69 73 | 74 2d 3e 52 65 6d 6f 76 |.fDocLis|t->Remov|
|00002960| 65 44 6f 63 28 66 43 75 | 72 44 6f 63 29 3b 0d 09 |eDoc(fCu|rDoc);..|
|00002970| 09 09 66 43 75 72 44 6f | 63 2d 3e 44 6f 43 6c 6f |..fCurDo|c->DoClo|
|00002980| 73 65 28 29 3b 0d 09 09 | 20 20 7d 0d 09 09 65 6c |se();...| }...el|
|00002990| 73 65 20 43 6c 6f 73 65 | 44 65 73 6b 41 63 63 28 |se Close|DeskAcc(|
|000029a0| 28 28 57 69 6e 64 6f 77 | 50 65 65 6b 29 20 66 57 |((Window|Peek) fW|
|000029b0| 68 69 63 68 57 69 6e 64 | 6f 77 29 2d 3e 77 69 6e |hichWind|ow)->win|
|000029c0| 64 6f 77 4b 69 6e 64 29 | 3b 0d 09 09 2f 2f 20 6d |dowKind)|;...// m|
|000029d0| 61 6b 65 20 73 75 72 65 | 20 6f 75 72 20 63 75 72 |ake sure| our cur|
|000029e0| 72 65 6e 74 20 64 6f 63 | 75 6d 65 6e 74 2f 77 69 |rent doc|ument/wi|
|000029f0| 6e 64 6f 77 20 72 65 66 | 65 72 65 6e 63 65 73 20 |ndow ref|erences |
|00002a00| 61 72 65 20 76 61 6c 69 | 64 0d 09 09 66 57 68 69 |are vali|d...fWhi|
|00002a10| 63 68 57 69 6e 64 6f 77 | 20 3d 20 46 72 6f 6e 74 |chWindow| = Front|
|00002a20| 57 69 6e 64 6f 77 28 29 | 3b 0d 09 09 69 66 20 28 |Window()|;...if (|
|00002a30| 66 57 68 69 63 68 57 69 | 6e 64 6f 77 20 21 3d 20 |fWhichWi|ndow != |
|00002a40| 6e 69 6c 29 0d 09 09 20 | 20 7b 0d 09 09 09 66 43 |nil)... | {....fC|
|00002a50| 75 72 44 6f 63 20 3d 20 | 66 44 6f 63 4c 69 73 74 |urDoc = |fDocList|
|00002a60| 2d 3e 46 69 6e 64 44 6f | 63 28 66 57 68 69 63 68 |->FindDo|c(fWhich|
|00002a70| 57 69 6e 64 6f 77 29 3b | 0d 09 09 09 53 65 74 50 |Window);|....SetP|
|00002a80| 6f 72 74 28 66 57 68 69 | 63 68 57 69 6e 64 6f 77 |ort(fWhi|chWindow|
|00002a90| 29 3b 0d 09 09 20 20 7d | 0d 09 09 65 6c 73 65 20 |);... }|...else |
|00002aa0| 66 43 75 72 44 6f 63 20 | 3d 20 6e 69 6c 3b 0d 09 |fCurDoc |= nil;..|
|00002ab0| 20 20 7d 0d 7d 0d 0d 42 | 6f 6f 6c 65 61 6e 20 54 | }.}..B|oolean T|
|00002ac0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 3a 3a 54 72 61 |Applicat|ion::Tra|
|00002ad0| 70 41 76 61 69 6c 61 62 | 6c 65 28 73 68 6f 72 74 |pAvailab|le(short|
|00002ae0| 20 74 4e 75 6d 62 65 72 | 2c 54 72 61 70 54 79 70 | tNumber|,TrapTyp|
|00002af0| 65 20 74 54 79 70 65 29 | 0d 7b 0d 09 2f 2f 20 43 |e tType)|.{..// C|
|00002b00| 68 65 63 6b 20 61 6e 64 | 20 73 65 65 20 69 66 20 |heck and| see if |
|00002b10| 74 68 65 20 74 72 61 70 | 20 65 78 69 73 74 73 2e |the trap| exists.|
|00002b20| 20 4f 6e 20 36 34 4b 20 | 52 4f 4d 20 6d 61 63 68 | On 64K |ROM mach|
|00002b30| 69 6e 65 73 2c 20 74 54 | 79 70 65 20 77 69 6c 6c |ines, tT|ype will|
|00002b40| 20 62 65 20 69 67 6e 6f | 72 65 64 2e 0d 09 72 65 | be igno|red...re|
|00002b50| 74 75 72 6e 20 4e 47 65 | 74 54 72 61 70 41 64 64 |turn NGe|tTrapAdd|
|00002b60| 72 65 73 73 28 74 4e 75 | 6d 62 65 72 2c 20 74 54 |ress(tNu|mber, tT|
|00002b70| 79 70 65 29 20 21 3d 20 | 47 65 74 54 72 61 70 41 |ype) != |GetTrapA|
|00002b80| 64 64 72 65 73 73 28 5f | 55 6e 69 6d 70 6c 65 6d |ddress(_|Unimplem|
|00002b90| 65 6e 74 65 64 29 3b 0d | 7d 20 2f 2a 54 72 61 70 |ented);.|} /*Trap|
|00002ba0| 41 76 61 69 6c 61 62 6c | 65 2a 2f 0d 0d 76 6f 69 |Availabl|e*/..voi|
|00002bb0| 64 20 41 6c 65 72 74 55 | 73 65 72 28 73 68 6f 72 |d AlertU|ser(shor|
|00002bc0| 74 20 65 72 72 52 65 73 | 49 44 2c 20 73 68 6f 72 |t errRes|ID, shor|
|00002bd0| 74 20 65 72 72 43 6f 64 | 65 29 0d 7b 0d 09 53 74 |t errCod|e).{..St|
|00002be0| 72 32 35 35 20 6d 65 73 | 73 61 67 65 3b 0d 0d 09 |r255 mes|sage;...|
|00002bf0| 53 65 74 43 75 72 73 6f | 72 28 26 71 64 2e 61 72 |SetCurso|r(&qd.ar|
|00002c00| 72 6f 77 29 3b 0d 09 47 | 65 74 49 6e 64 53 74 72 |row);..G|etIndStr|
|00002c10| 69 6e 67 28 6d 65 73 73 | 61 67 65 2c 20 65 72 72 |ing(mess|age, err|
|00002c20| 52 65 73 49 44 2c 20 65 | 72 72 43 6f 64 65 29 3b |ResID, e|rrCode);|
|00002c30| 0d 09 50 61 72 61 6d 54 | 65 78 74 28 6d 65 73 73 |..ParamT|ext(mess|
|00002c40| 61 67 65 2c 20 22 5c 70 | 22 2c 20 22 5c 70 22 2c |age, "\p|", "\p",|
|00002c50| 20 22 5c 70 22 29 3b 0d | 09 28 76 6f 69 64 29 20 | "\p");.|.(void) |
|00002c60| 41 6c 65 72 74 28 72 55 | 73 65 72 41 6c 65 72 74 |Alert(rU|serAlert|
|00002c70| 2c 20 28 4d 6f 64 61 6c | 46 69 6c 74 65 72 50 72 |, (Modal|FilterPr|
|00002c80| 6f 63 50 74 72 29 20 6e | 69 6c 29 3b 0d 7d 20 2f |ocPtr) n|il);.} /|
|00002c90| 2f 20 41 6c 65 72 74 55 | 73 65 72 0d 0d 76 6f 69 |/ AlertU|ser..voi|
|00002ca0| 64 20 42 69 67 42 61 64 | 45 72 72 6f 72 28 73 68 |d BigBad|Error(sh|
|00002cb0| 6f 72 74 20 65 72 72 52 | 65 73 49 44 2c 20 73 68 |ort errR|esID, sh|
|00002cc0| 6f 72 74 20 65 72 72 43 | 6f 64 65 29 0d 7b 0d 09 |ort errC|ode).{..|
|00002cd0| 41 6c 65 72 74 55 73 65 | 72 28 65 72 72 52 65 73 |AlertUse|r(errRes|
|00002ce0| 49 44 2c 65 72 72 43 6f | 64 65 29 3b 0d 09 45 78 |ID,errCo|de);..Ex|
|00002cf0| 69 74 54 6f 53 68 65 6c | 6c 28 29 3b 0d 7d 0d 0d |itToShel|l();.}..|
|00002d00| 2f 2f 20 54 68 61 74 27 | 73 20 61 6c 6c 2c 20 66 |// That'|s all, f|
|00002d10| 6f 6c 6b 73 2e 2e 2e 0d | 00 00 00 00 00 00 00 00 |olks....|........|
|00002d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002d80| 00 00 01 00 00 00 01 1e | 00 00 00 1e 00 00 00 1e |........|........|
|00002d90| 00 00 18 d9 0a 49 6e 74 | 65 72 66 61 63 65 73 72 |.....Int|erfacesr|
|00002da0| 01 00 00 00 00 05 00 00 | 19 01 9f b7 a4 ac a0 70 |........|.......p|
|00002db0| 0f 54 41 70 70 6c 69 63 | 61 74 69 6f 6e 2e 63 70 |.TApplic|ation.cp|
|00002dc0| 02 00 00 00 54 45 58 54 | 4d 50 53 20 01 00 00 00 |....TEXT|MPS ....|
|00002dd0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 00 01 20 |..TEXTMP|S ..... |
|00002de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002df0| 00 00 a1 4b 04 00 00 00 | 2c 98 00 00 01 3c 19 08 |...K....|,....<..|
|00002e00| 9f b7 a3 f5 a0 70 4b e2 | 00 00 00 00 00 7a 00 2c |.....pK.|.....z.,|
|00002e10| 01 36 01 c0 01 0e 00 40 | 01 40 01 00 ff f8 ff f0 |.6.....@|.@......|
|00002e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 0f 00 00 00 |........|........|
|00002e40| 18 d9 09 4d 50 57 20 53 | 68 65 6c 6c 02 00 00 00 |...MPW S|hell....|
|00002e50| 41 50 50 4c 4d 50 53 20 | 21 0e 00 80 00 00 00 00 |APPLMPS |!.......|
|00002e60| 00 00 18 db 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002e70| 00 06 e1 ed 00 06 e4 00 | 9f b9 93 40 a1 11 7d f6 |........|...@..}.|
|00002e80| 00 00 00 1a 03 01 40 09 | 00 00 05 33 2e 31 61 38 |......@.|...3.1a8|
|00002e90| 0d 4d 50 57 20 43 2b 2b | 20 33 2e 31 61 39 00 00 |.MPW C++| 3.1a9..|
|00002ea0| 01 00 00 00 01 1e 00 00 | 00 1e 00 00 00 1e 00 12 |........|........|
|00002eb0| 17 18 0b 06 00 00 00 1c | 00 1e ff ff 00 00 00 00 |........|........|
|00002ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+